<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>

<style>
<!--
.bankinfo{
width: 600px;
}
-->
</style>

<script type="text/javascript">
$(function() {
     parent.$.messager.progress('close');
});

var var_column_item='<s:text name="erp.business.contract.trade.item"></s:text>';
var var_column_itemSize='<s:text name="erp.business.contract.trade.itemsize"></s:text>';
var var_column_totalCont='<s:text name="erp.business.contract.trade.totalcont"></s:text>';
var var_column_boxCont='<s:text name="erp.business.contract.trade.boxcont"></s:text>';
var var_column_totalBox='<s:text name="erp.business.contract.trade.totalbox"></s:text>';
var var_column_pcsBox='<s:text name="erp.business.contract.trade.pcsbox"></s:text>';
var var_column_totalPcs='<s:text name="erp.business.contract.trade.totalpcs"></s:text>';
var var_column_mtwoCont='<s:text name="erp.business.contract.trade.mtwocont"></s:text>';
var var_column_totalMtwo='<s:text name="erp.business.contract.trade.totalmtwo"></s:text>';
var var_column_fobunitPrice='<s:text name="erp.business.contract.trade.fobunitprice"></s:text>';
var var_column_amount='<s:text name="erp.business.contract.trade.amount"></s:text>';

var var_crmcus_select_title='<s:text name="erp.selectbusiness"><s:param><s:text name="erp.business.crm.crmcustomer.businame"></s:text></s:param></s:text>';
var var_crmcus_please_select='<s:text name="erp.please.selectbusiness"><s:param><s:text name="erp.business.crm.crmcustomer.businame"></s:text></s:param></s:text>';
var var_crmcus_onlyone_select='<s:text name="erp.only.selectone.business"><s:param><s:text name="erp.business.crm.crmcustomer.businame"></s:text></s:param></s:text>';
var var_fobcost_select_title='<s:text name="erp.selectbusiness"><s:param><s:text name="erp.business.fobcost.businame"></s:text></s:param></s:text>';
var var_fobcost_please_select='<s:text name="erp.please.selectbusiness"><s:param><s:text name="erp.business.fobcost.businame"></s:text></s:param></s:text>';
var var_fobcost_onlyone_select='<s:text name="erp.only.selectone.business"><s:param><s:text name="erp.business.fobcost.businame"></s:text></s:param></s:text>';

var var_tatal_amount_str = "<s:text name='erp.business.contract.trade.totalamount'></s:text>";
var var_dtl_title = '<s:text name="erp.main.detail"></s:text>';
var var_dtl_required = '<s:text name="erp.required.business"><s:param><s:text name="erp.main.detail"></s:text></s:param></s:text>';
</script>
<script type="text/javascript" src="${ctx}/js/erp/contract/trade/addTradeCusContract.js"></script>

<div id="add-edit-dialog">
        <div class="p5">
            <form id="form" name="form" action="" method="post">
                <table class="tablewidth1">
                	<tr>
                		<td align="center" colspan="3">
                			<input type="hidden" id="inexpComName" name="inexpComName" value="${company.expComName}"/>
                			<h4>${company.expComName}</h4>
                		</td>
                	</tr>
                	<tr>
                		<td align="center" colspan="3">
                			<input type="hidden" id="inexpComAddress" name="inexpComAddress" value="${company.expComAddress}"/>
                			<h4>${company.expComAddress}</h4>
                		</td>
                	</tr>
                	<tr>
                		<td align="center" colspan="3">
                			<input type="hidden" id="companyAddress" name="companyAddress" value="${company.companyAddress}"/>
                			<h4>${company.companyAddress}</h4>
                		</td>
                	</tr>
                	<tr>
                		<td align="center" colspan="3">
                			<input type="hidden" id="companyEmail" name="companyEmail" value="${company.companyEmail}"/>
                			<input type="hidden" id="companyMob" name="companyMob" value="${company.companyMob}"/>
                			<input type="hidden" id="companyTel" name="companyTel" value="${company.companyTel}"/>
                			<input type="hidden" id="companyFax" name="companyFax" value="${company.companyFax}"/>
                			<h5>
                				${company.companyEmail}
                				&nbsp;&nbsp;&nbsp;
                				${company.companyMob}
                				&nbsp;&nbsp;&nbsp;
                				${company.companyTel}
                				&nbsp;&nbsp;&nbsp;
                				${company.companyFax}
                			</h5>
                		</td>
                	</tr>
                	<tr>
                		<td align="center" colspan="3">
                			<h4><u><s:text name="erp.business.contract.trade.commerinvoice"></s:text></u></h4>
                		</td>
                	</tr>
                	<tr>
                		<td align="right">
                			<h4>
                			<s:text name="erp.business.contract.trade.to"></s:text>：
                			</h4>
                			<br/>
                			<br/>
                			<br/>
                			<br/>
                			<br/>
                			&nbsp;
                		</td>
                		<td align="left">               			
                			<textarea rows="4" cols="5" id="cusAddress" name="cusAddress" style="width: 380px;height:50px;" onclick="javascript:selectCustomer();" placeholder="<s:text name='erp.click.select'></s:text>" readonly="readonly"></textarea>
                			<br/>
                			<input type="text" id="cusTelFax" name="cusTelFax" style="width: 380px;" onclick="javascript:selectCustomer();" placeholder="<s:text name='erp.click.select'></s:text>" readonly="readonly"/>
                			<br/>
                			<input type="text" id="cusEmail" name="cusEmail" style="width: 380px;" onclick="javascript:selectCustomer();" placeholder="<s:text name='erp.click.select'></s:text>" readonly="readonly"/>
                		</td>
                		<td align="left">
                			<h5>
                			<u><s:text name="erp.business.contract.trade.invoiceno"></s:text>：${tradeCusContract.invoiceNo}</u>
                			</h5>
                			<br/>
                			<h5>
                			<u><s:text name="erp.business.contract.trade.invoicedate"></s:text>：${tradeCusContract.invoiceDate}</u>
                			</h5>
                			<br/>
                			<br/>
                			&nbsp;
                			<input type="hidden" id="invoiceNo" name="invoiceNo" value="${tradeCusContract.invoiceNo}"/>
                			<input type="hidden" id="invoiceDate" name="invoiceDate" value="${tradeCusContract.invoiceDate}"/>
                		</td>
                	</tr>
                </table>

                <div class="fn-clear"></div>

                <table id="dtlDatagrid"></table> 
  				<!-- 细表数据字段 -->
                <input type="hidden" id="itemDtl" name="itemDtl" />
                <input type="hidden" id="itemSizeDtl" name="itemSizeDtl"/>
                <input type="hidden" id="totalContDtl" name="totalContDtl"/>
                <input type="hidden" id="boxOfContDtl" name="boxOfContDtl"/>
                <input type="hidden" id="totalBoxsDtl" name="totalBoxsDtl"/>
                <input type="hidden" id="pcsOfBoxDtl" name="pcsOfBoxDtl"/>
                <input type="hidden" id="totalPcsDtl" name="totalPcsDtl"/>
                <input type="hidden" id="mtwoOfContDtl" name="mtwoOfContDtl"/>
                <input type="hidden" id="totalMtwoDtl" name="totalMtwoDtl"/>
                <input type="hidden" id="fobUnitPriceDtl" name="fobUnitPriceDtl"/>
				<input type="hidden" id="amountDtl" name="amountDtl"/>
                
                <table id="totalTab"></table>
                
                <table id="amountEnTab"></table>
				
				<input type="hidden" id="totTotalConts" name="totTotalConts" />
                <input type="hidden" id="totTotalBoxs" name="totTotalBoxs"/>
                <input type="hidden" id="totTotalPcs" name="totTotalPcs"/>
                <input type="hidden" id="totTotalMtwos" name="totTotalMtwos"/>
                <input type="hidden" id="totTotalAmount" name="totTotalAmount"/>
                <input type="hidden" id="totTotalAmountEn" name="totTotalAmountEn"/>
				
                <div>
                	<h5>
	                	<u><s:text name="erp.business.contract.trade.bankinfo"></s:text></u>
	                	<br/>
	                	<input id="benBankName" name="benBankName" type="text" value="${company.benBankName}" class="bankinfo" readonly="readonly"/>
	                	<br/>
	                	<input id="benBankCode" name="benBankCode" type="text" value="${company.benBankCode}" class="bankinfo" readonly="readonly"/>
	                	<br/>
	                	<input id="swiftCode" name="swiftCode" type="text" value="${company.swiftCode}" class="bankinfo" readonly="readonly"/>
	                	<br/>
	                	<input id="acName" name="acName" type="text" value="${company.acName}" class="bankinfo" readonly="readonly"/>
	                	<br/>
	                	<input id="acCode" name="acCode" type="text" value="${company.acCode}" class="bankinfo" readonly="readonly"/>
                	</h5>
                </div>
                <div>
                	<h5>
                	<u><s:text name="erp.business.contract.trade.seller"></s:text></u>
                	<br/>
                	<span>${company.expComName}</span>
                	</h5>
                </div>
            </form>
        </div>
    </div> 